package com.yishun.springboot.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yishun.springboot.pojo.User;

@Mapper
public interface UserMapper {
	User getUserByUsername(@Param("username") String username);

	List<Map<String, Object>> getRoleAndPage(@Param("userId") String userId, @Param("userName") String userName);

	List<Map<String, Object>> findByRoleIdAndUserName(@Param("roleNames") List<Object> roleNames,
			@Param("userName") String userName);

	List<Integer> getRoleId(String userName);

	List<Map<String, Object>> getConditionInquire(@Param("map") Map<String, Object> map);

	Integer getConditionInquireCount(@Param("map") Map<String, Object> map);

	Integer upTbUsers(User user);

	Integer delPageRole(@Param("roleIdOrname") String roleIdOrname);

	Integer delRolesPermission(@Param("roleIdOrname") String roleIdOrname);

	Integer delUserMenu(@Param("roleIdOrname") String roleIdOrname);

	Integer delUser(@Param("userId") Integer userId);

	Integer addUser(User user);

	Integer addUsers(@Param("listUser") List<User> listUser);
}
